//
//  ToolKit.m
//  dingmore
//
//  Created by yanbo on 14-3-6.
//  Copyright (c) 2014年 dingmore. All rights reserved.
//

#import "ToolKit.h"

@implementation ToolKit

+ (void)saveUser:(NSString *)username userid:(NSString *)userid
{
    NSUserDefaults * settings = [NSUserDefaults standardUserDefaults];
    [settings removeObjectForKey:@"userinfo"];
    [settings setObject:[NSString stringWithFormat:@"%@|%@",username,userid] forKey:@"userinfo"];
    [settings synchronize];
}

+ (NSString *)getUser
{
    NSUserDefaults * settings = [NSUserDefaults standardUserDefaults];
    return [settings objectForKey:@"userinfo"];
}

+ (void)removeUser
{
    NSUserDefaults * settings = [NSUserDefaults standardUserDefaults];
    [settings removeObjectForKey:@"userinfo"];
    [settings synchronize];
}

+ (void)saveWML:(NSString *)first
{
    NSUserDefaults * settings = [NSUserDefaults standardUserDefaults];
    [settings removeObjectForKey:@"vmlFirst"];
    [settings setObject:first forKey:@"vmlFirst"];
    [settings synchronize];
}
+ (NSString *)getWML
{
    NSUserDefaults * settings = [NSUserDefaults standardUserDefaults];
    return [settings objectForKey:@"vmlFirst"];
}

@end
